package collector

import (
	"fmt"

	"sysinfo/internal/types"
)

// CollectGPU 收集GPU信息
// This function collects information about all GPUs in the system, including integrated and dedicated graphics cards
func CollectGPU() (*types.GPUData, error) {
	gpus := collectGPUPlatform()

	if len(gpus) == 0 {
		return nil, fmt.Errorf("no GPU information available")
	}

	data := &types.GPUData{
		GPUs: gpus,
	}

	return data, nil
}
